
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import javax.net.ssl.HttpsURLConnection;


public class HTTPConnecion  {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		URL url=null;
		try {
			url = new URL("https://www.securityfocus.com/jobs/employers?op=display_comments&c=jobseeker&.x=0&.y=0&Password=qwerty&UserName=david");
			HttpURLConnection conn = (HttpURLConnection)url.openConnection();
			HttpsURLConnection sconn = (HttpsURLConnection)url.openConnection();
			System.out.println("Response Code: " + sconn.getResponseCode());
			System.out.println("Response Massage: " + sconn.getResponseMessage());
			System.out.println("Method: " + sconn.getRequestMethod());
			System.out.println("Response Code: " + conn.getResponseCode());
			System.out.println("Response Massage: " + conn.getResponseMessage());
			System.out.println("Method: " + conn.getRequestMethod());
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
